﻿package com.toncen.samepms.system.action;

import com.toncen.samepms.common.AbstractDatabaseAction;
import com.toncen.samepms.system.dao.ModuleDao;
import com.toncen.samepms.system.domain.Module;

/**
 * 描述：模块表SYSTEM_MODULE的action文件
 * 
 * @author tch
 * 
 */
public class ModuleAction extends AbstractDatabaseAction<Module, ModuleDao> {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1331283566492L;

	public ModuleAction() throws Exception {
		super();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.toncen.samepms.common.AbstractAction#prepareOnDoEdit()
	 */
	@Override
	public void prepareOnDoEdit() throws Exception {
		super.prepareOnDoEdit();
		getDomain().setParent(getDao().find(getDomain().getParent()));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.toncen.samepms.common.AbstractAction#prepareOnDoNew()
	 */
	@Override
	public void prepareOnDoNew() throws Exception {
		super.prepareOnDoNew();
		getDomain().setParent(getDao().find(getDomain().getParent()));
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.toncen.samepms.common.AbstractAction#prepareOnDoView()
	 */
	@Override
	public void prepareOnDoView() throws Exception {
		super.prepareOnDoView();
		getDomain().setParent(getDao().find(getDomain().getParent()));
	}

}
